@import '@/styles/utils.scss';
@import '@/styles/sizes.scss';
@mixin button {
  position: absolute;
  z-index: 100;
  width: px2rem(50);
  height: px2rem(50);
  cursor: pointer;
  opacity: 0.8;
  background-color: #e2c199;
  border-radius: px2rem(500);
  text-align: center;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: px2rem(50);
}

:global(.Home_Carousel__img-enter) {
  opacity: 0;
}
:global(.Home_Carousel__img-enter-active) {
  opacity: 1;
  transition: opacity 200ms ease-in;
}
:global(.Home_Carousel__img-exit) {
  opacity: 1;
}
:global(.Home_Carousel__img-exit-active) {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.carousel {
  position: relative;
  width: 100%;
  height: px2rem(420);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;

  .link {
    height: px2rem(420);
    display: inline-block;
    cursor: pointer;

    .image {
      display: block;
      cursor: pointer;
    }
  }

  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: px2rem(420);

    .overlay__content {
      position: relative;
      width: px2rem(1090);
      height: px2rem(420);

      .overlay__prev {
        @include button;
        top: px2rem(185);
        left: 0;

        @media screen and (min-width: #{$contentMaxWidth + 120}px) {
          left: -60px;
        }
      }
      .overlay__next {
        @include button;
        top: px2rem(185);
        right: 0;

        @media screen and (min-width: #{$contentMaxWidth + 120}px) {
          left: #{$contentMaxWidth + 10}px;
        }
      }

      .overlay__dots {
        position: absolute;
        bottom: px2rem(4);
        margin: 0 auto;
        width: 100%;
        padding: 0;
        list-style: none;
        display: flex;
        justify-content: center;
        align-items: center;

        .overlay__dot {
          position: relative;
          display: inline-block;
          width: px2rem(8);
          height: px2rem(8);
          margin: 0 px2rem(8) px2rem(10);
          padding: 0;
          cursor: pointer;

          button {
            font-size: 0;
            line-height: 0;
            display: block;
            width: px2rem(8);
            height: px2rem(8);
            border-radius: px2rem(500);
            cursor: pointer;
            color: transparent;
            border: 1px solid #cecece;
            background: #fff;
            padding: 0;
            margin: 0;
          }

          button.active {
            box-shadow: 0 0 0 4px #dfcead;
            background: #a7936e;
            border-radius: px2rem(500);
            border: none;
          }
        }
      }
    }
  }
}
